package com.tql.mall.model.enums.customer;

import lombok.Getter;

@Getter
public enum CustLoginFailEnum {
    FAIL_PASSWD_OR_ACCOUNT_ERROR(1,"账号或密码错误！"),
    FAIL_INFO_NOT_COMPLETED(2,"请将登录信息填写完整！"),
    ;
    private Integer status;
    private String msg;

    CustLoginFailEnum(Integer status,String msg){
        this.status =  status;
        this.msg = msg;
    }
    public static String getStatusNameByStatus(Integer status){
        CustLoginFailEnum[] values = CustLoginFailEnum.values();
        for (CustLoginFailEnum value : values){
            if (status.intValue() == value.getStatus().intValue()){
                return value.getMsg();
            }
        }
        return "";
    }
}
